﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="6.aspx.cs" Inherits="BaseWeb.拖拽研究._5" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>拖动方向</title>
    <%--
    默认拖动方向为x,y两个方向。通过draggable的axis参数可以限制只能水平或竖直拖动。如下：
    --%>

    <script src="../../js/jquery-1.7.min.js" type="text/javascript"></script>

    <script src="../../js/jquery-ui-1.8.16.custom.min.js" type="text/javascript"></script>

    <script>
        $(function()
        {
            $("#dragX").draggable({ axis: "x" });
            $("#dragY").draggable({ axis: "y" });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div id="dragX">
        <p>
            －－</p>
    </div>
    <div id="dragY">
        <p>
            |</p>
    </div>
    </form>
</body>
</html>
